import request from '@/utils/request'

export function getList(data: any) {
  return request({
    url: '/Wms_Item/GetList',
    method: 'post',
    data,
  })
}
export function getTreeList(data: any) {
  return request({
    url: '/Wms_Item_Category/TreeGridListJson',
    method: 'post',
    data,
  })
}
export function getFlieList(data: any) {
  return request({
    url: '/WF_Document/GetList',
    method: 'post',
    data,
  })
}
export function delDoc(data: any) {
  return request({
    url: '/WF_Document/deldoc',
    method: 'post',
    data,
  })
}
export function getPageData(data: any) {
  return request({
    url: '/Wms_Item/GetPageData',
    method: 'post',
    data,
  })
}

export function doEdit(data: any) {
  return request({
    url: '/Wms_Item/save',
    method: 'post',
    data,
  })
}
export function gets(data: any) {
  return request({
    url: '/Wms_Item/GetS',
    method: 'post',
    data,
  })
}
export function doDelete(data: any) {
  return request({
    url: '/Wms_Item/dels',
    method: 'post',
    data,
  })
}

// 物资表下载

export function Wms_itemDown(data: any) {
  return request({
    url: '/Wms_Item/DownLoadTemplate',
    method: 'get',
    headers: { 'Content-Type': 'application/json; application/octet-stream' },
    responseType: 'arraybuffer',
  })
}

// 物资表导出

export function Wms_itemExport(data: any) {
  return request({
    url: '/Wms_Item/Export',
    method: 'post',
    headers: { 'Content-Type': 'application/json; application/octet-stream' },
    responseType: 'arraybuffer',
    data,
  })
}
